package edu.hhu.controller;

import java.util.List;

import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

public class SummeryController  extends Controller{
	public void index(){
		String sql="select a.wellgroupcode,SUM(IFNULL(a.YLCQ,0))as 月累产气量,SUM(IFNULL(a.LLCQ,0))as 年累产气量,SUM(IFNULL(a.LJCQ,0))as 累产气量,SUM(IFNULL(a.YLCY,0))as 月累产液,SUM(IFNULL(a.LLCY,0))as 年累产液,SUM(IFNULL(a.LJCY,0))as 累产液量 from (SELECT  cjkj.wellame,cjkj.wellgroupcode,cjkj.wellcode,cjkj.blockcode,cjkj.gasfieldcode, cjsctjtemp.LJCQ,cjsctjtemp.LJCY ,cjsctjtemp.LLCQ,cjsctjtemp.LLCY,cjsctjtemp.YLCQ,cjsctjtemp.YLCY from cjsctjtemp INNER JOIN cjkj ON cjsctjtemp.wellcode=cjkj.wellcode AND cjkj.wellgroupcode!=' ')a GROUP BY a.wellgroupcode";
		List<Record> data = Db.use("mysql").find("select * from user");
	    this.setAttr("data", data);
	    this.render("/home/index.jsp");
	
	}

}
